[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "builddsl"
version = "1.0.1"
description = "A superset of the Python programming language with support for closures and multi-line lambdas."
authors = ["Niklas Rosenstein <rosensteinniklas@gmail.com>"]
license = "MIT"
readme = "readme.md"
packages = [{ include = "builddsl", from="src" }]

[tool.poetry.urls]
Homepage = "https://github.com/NiklasRosenstein/python-builddsl"
Documentation = "https://niklasrosenstein.github.io/python-builddsl/"

[tool.poetry.dependencies]
python = "^3.6"
typing-extensions = ">=3.0.0"
nr-io-lexer = "^1.0.0"
dataclasses = { version = "^0.6", python = "<3.7" }

[tool.poetry.dev-dependencies]
astor = "^0.8.1"
black = "*"
flake8 = "*"
isort = "*"
mypy = "*"
pytest = "*"
termcolor = ">=1.1.0,<3.0.0"
types-termcolor = "*"
types-dataclasses = "*"

[tool.poetry.group.astor]
optional = true

[tool.poetry.group.astor.dependencies]
astor = "^0.8.1"

[tool.slap]
typed = true

[tool.slap.test]
black = "black --check src/ examples/"
check = "slap check"
flake8 = "flake8 src/ examples/"
isort = "isort --check-only src/ examples/"
mypy = "dmypy run src/ examples/"
pytest = "pytest test/ -vv"

[tool.slap.run]
"docs:build" = "cd docs && novella --base-url kraken-core/"
"docs:dev" = "cd docs && novella --serve"
fmt = "black src/ examples/ && isort src/ examples/"

[tool.mypy]
explicit_package_bases = true
mypy_path = ["src"]
namespace_packages = true
pretty = true
python_version = "3.6"
show_error_codes = true
show_error_context = true
strict = true
warn_no_return = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_ignores = true

[[tool.mypy.overrides]]
ignore_errors = true
ignore_missing_imports = true
module = "networkx.*"

[tool.isort]
combine_as_imports = true
line_length = 120
profile = "black"

[tool.black]
line-length = 120
